<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>余额记录</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="__INDEX__/store/css/mui.min.css" rel="stylesheet" />
		<script src="__INDEX__/js/mui.min.js"></script>
		<link rel="stylesheet" type="text/css" href="__INDEX__/store/css/style.css" />
		<link rel="stylesheet" href="__INDEX__/store/css/newsj.css" />
		<style type="text/css">
			.record_list3 {
				display: table;
				width: 100%;
				padding-bottom: 0;
			}
			
			.record_list3 .center {
				line-height: normal;
			}
			
			.record_list3 .right,
			.record_nav .right,
			.record_nav .left {
				text-align: center;
			}
			
			.record_list3 li {
				border: 0;
				background: white;
				display: table-cell;
				text-align: center;
				padding: 3% 0;
				vertical-align: middle;
				line-height: normal;
			}
			.gljjl_btnbox{
				background: #1DAA39;
			}
			.gljjl_btnbox a{
				font-size: 1.2rem;
				width: 100%;  
			}
		</style>
	</head>

	<body style="background: white;">
		<header class="mui-bar mui-bar-nav">
			<a class=" mui-icon mui-icon-left-nav mui-pull-left" href="JavaScript:history.go(-1)"></a>
			<h1 class="mui-title">余额记录</h1>
		</header>
		<div class="mui-content sjindexcon" style="padding-bottom: 4rem;">
			<ul class="hbjl_list">

			</ul>
			<input type="hidden" id="page" value="1" />
			<div class="gljjl_btnbox">
				<a href="yue_tixian.html">余额提现</a> 
			</div>
		</div>
	</body>

</html>
{include file="public/footer" /}
<script type="text/javascript" src="__INDEX__/js/menudown.js" ></script>
<script type="text/javascript">
	$.ajax({
		type: "post",
		data: {
			page: $("#page").val()
		},
		url: "{:url('store/agent/yue_records')}",
		success: function(data) {
			var list = data.list;
			var html = "";
			if(list != '') {
				for(var i = 0; i < list.length; i++) {
					var log = list[i];
					html += '<li>' +
						'<div class="left">' +
						'<p class="type">' + log.message + '</p>' +
						'<p class="time">' + log.add_time + '</p>' +
						'</div>' +
						'<div class="right add">' + log['balance'] + '</div>' +
						'</li>';
				}
			} else {
				html="<img src='__PUBLIC__/static/wx/images/ddnone.jpg' style='margin-top: 120px;'>";
			}
			$(".hbjl_list").html(html);

		}
	});

	$(window).scroll(function() {
		var scrollTop = $(window).scrollTop(); //滚动条高度
		var bodyheight = $(document).height(); //文档的高度
		var windowheight = window.innerHeight; //$(window).height();              //当前窗体的高度
		if((bodyheight - windowheight - scrollTop) == 0) {
			$.ajax({
				type: "post",
				data: {
					page:parseFloat($("#page").val())+1
				},
				url: "{:url('store/agent/yue_records')}",
				success: function(data) {
					var list = data.list;
					var html = "";
					if(list) {
						$("#page").val(parseFloat($("#page").val())+1);
						for(var i = 0; i < list.length; i++) {
							var log = list[i];
							html += '<li>' +
								'<div class="left">' +
								'<p class="type">' + log.message + '</p>' +
								'<p class="time">' + log.add_time + '</p>' +
								'</div>' +
								'<div class="right add">' + log['balance'] + '</div>' +
								'</li>';
						}
					} else {
						html = "没有记录";
					}
					$(".hbjl_list").append(html);

				}
			});

		}
	})
</script>